//
//  AMDefine.h
//  WeiDu_1_0
//
//  Created by foguo-mac-1 on 01/07/16.
//  Copyright (c) 2016 WeiDu Energy Tech. All rights reserved.
//

#ifndef ShenOu_AMDefine_h
#define ShenOu_AMDefine_h

#define FILE_TYPE_CAF                               @"caf"
#define FILE_TYPE_AAC                               @"aac"
#define FILE_TYPE_WAV                               @"wav"
#define FILE_TYPE_AMR                               @"amr"
#define FILE_TYPE_JPEG                              @"jpeg"
#define FILE_TYPE_LOG                               @"log"
#define FILE_TYPE_JPG                               @"jpg"

#define FILE_TYPE_PNG                               @"png"
#define FILE_TYPE_MP4                               @"mp4"



typedef enum
{
    ACTION_TYPE_REQUEST_LOGIN = 100,
    ACTION_TYPE_REQUEST_REGISTER,
    
    ACTION_TYPE_MESSAGE
}
ACTION_TYPE;

#pragma mark - -- keyboard
typedef enum
{
    //For Message Status Type.
    KB_SWITCHING2SHOW,
    KB_SWITCHING2HIDE,
    KB_SHOWEN,
    KB_HIDEN,
}
KEYBOARD_TYPE;

#pragma mark - -- message type -- 
typedef enum
{
    /*
     0：融云消息 （第三方)
     1：系统消息 （列表接口GetMessageList)
     2：新闻资讯消息 （列表接口)
     3：订单消息 （列表接口GetMessageList)
     */
    HO_MESSAGE_TYPE_RONGYUN,           //The message of Rongyun        融云消息
    HO_MESSAGE_TYPE_SYSTEM,            //The news of system            系统消息
    HO_MESSAGE_TYPE_NEWS,              //The message of new            新闻资讯消息
    HO_MESSAGE_TYPE_ORDER,             //The news of order				订单消息
	
}
HO_MESSAGE_TYPE;

#pragma mark - -- request priority
typedef enum
{
    HO_REQUEST_PRIORITY_EXTRAHIGHT,
    HO_REQUEST_PRIORITY_HIGHT,
    HO_REQUEST_PRIORITY_MIDDLE,
    HO_REQUEST_PRIORITY_LOW,
    HO_REQUEST_PRIORITY_EXTRALOW,
}
AM_REQUEST_PRIORITY;

#pragma mark - -- request status
typedef enum
{
    HO_REQUEST_STATUS_UNDO,
    HO_REQUEST_STATUS_DOING,
    HO_REQUEST_STATUS_DONE,
    HO_REQUEST_STATUS_FAILED,
    HO_REQUEST_STATUS_CANCELED,
}
HO_REQUEST_STATUS;

typedef enum
{
	HO_REPORT_TYPE_NORMAL = 1,//普通1
	HO_REPORT_TYPE_EXTRAASSIS,//外协2
	HO_REPORT_TYPE_ASSISTANT, //协助3
}
HO_REPORT_TYPE;

#pragma mark - -- error code --
typedef enum
{
    ERROR_CODE_NON = 0,
    ERROR_CODE_NETWORK_DOWN,                    //Network is down.
	ERROR_CODE_SERVER_DOWN, 					//server down.
    ERROR_CODE_REQUEST_TIMEOUT,                //Request timeout.
    
    ERROR_CODE_RESPONSEDATA_EMPTY,              //responsed data is nil.
    ERROR_CODE_RESPONSEDATA_INVALIDE,           //responsed data is not nil, but invalid.
    ERROR_CODE_JSONPARSE_FAILED,                //responsed data is not json format.
    
    ERROR_CODE_JSON_DATANODE_EMPTY,              //responsed data's data node is not json format.
    ERROR_CODE_JSON_DATANODE_INVALIDE,           //responsed data's data node is not json format.
    ERROR_CODE_JSON_DATANODE_PARSE_FAILED,       //responsed data's data node is not json format.
	
	ERROR_CODE_10001 = 10001, //:系统错误'
	ERROR_CODE_10002 = 10002,      //用户TOKEN检验失败或则已过期
	ERROR_CODE_10004 = 10004,//MaxId(用于列表分页)不能为空
	ERROR_CODE_10005 = 10005,//未知错误
	ERROR_CODE_10022 = 10022, //DevID不能为空
	ERROR_CODE_10023 = 10023, //RegistrationID不能为空
	ERROR_CODE_10024 = 10024, //未授权登录帐号
	ERROR_CODE_10025 = 10025, //用户不存在或被禁用
	ERROR_CODE_10026 = 10026, //用户手机号不能为空
	ERROR_CODE_10027 = 10027, //手机号格式错误
	ERROR_CODE_10028 = 10028, //手机号被占用
	ERROR_CODE_10029 = 10029, //用户名长度必须在6-30个字符以内
	ERROR_CODE_10030 = 10030, //用户名被占用
	ERROR_CODE_10031 = 10031, //密码长度必须在6-30个字符之间
	ERROR_CODE_10032 = 10032, //邮箱格式不正确
	ERROR_CODE_10033 = 10033, //邮箱长度必须在1-32个字符之间
	ERROR_CODE_10034 = 10034, //邮箱被禁止注册
	ERROR_CODE_10035 = 10035, //邮箱被占用
	ERROR_CODE_10036 = 10036, //手机格式不正确
	ERROR_CODE_10037 = 10037, //手机被禁止注册
	ERROR_CODE_10038 = 10038, //手机号被占用
	ERROR_CODE_10039 = 10039, //原始密码不能为空
	ERROR_CODE_10040 = 10040, //新密码不能为空
	ERROR_CODE_10041 = 10041, //确认密码不能为空
	ERROR_CODE_10042 = 10042, //两次密码输入不一致
	ERROR_CODE_10043 = 10043, //密码错误
	
	
	
	ERROR_CODE_10200 = 10200, //故障分类ID不能为空
	ERROR_CODE_10201 = 10201, //部门ID不能为空
	ERROR_CODE_10202 = 10202, //故障详情不能为空
	ERROR_CODE_10203 = 10203, //故障分类不存在
	ERROR_CODE_10204 = 10204, //部门不存在
	ERROR_CODE_10205 = 10205, //报修失败:
	ERROR_CODE_10206 = 10206, //处理人不存在
	ERROR_CODE_10207 = 10207, //报修区域不存在
	ERROR_CODE_10208 = 10208, //报修区域楼宇不存在
	ERROR_CODE_10209 = 10209, //筛选状态不能为空
	ERROR_CODE_10210 = 10210, //报修单ID不能为空
	ERROR_CODE_10211 = 10211, //报修信息不存在
	ERROR_CODE_10212 = 10212, //报修区域ID不能为空
	ERROR_CODE_10213 = 10213, //操作状态不能为空
	ERROR_CODE_10214 = 10214, //操作状态不存在
	
#pragma mark - Caiyun
	ERROR_CODE_4016 = 4016, //appId错误, 应用不存在
	ERROR_CODE_4017 = 4017, //appId, appSecret不能为空
	ERROR_CODE_4031 = 4031, //应用密钥AppSecret错误
	ERROR_CODE_4035 = 4035, //缺少登录token或orgSecret参数
	ERROR_CODE_4018 = 4018, //Token校验失败
}
AM_ERROR_CODE;




#pragma mark - -- MODULE define --
typedef enum
{
    HO_MODULE_TYPE_USER, //HO_MODULE_TYPE_USERINFO
    HO_MODULE_TYPE_MESSAGE,
    HO_MODULE_TYPE_MY,
    HO_MODULE_TYPE_APP
}
HO_MODULE_TYPE;

typedef enum
{
    HO_ATTENTION_TYPE_BIDDING,      //竞价
    HO_ATTENTION_TYPE_AUCTION,      //拍卖
    HO_ATTENTION_TYPE_FIXEDPRICE,   //一口价
    HO_ATTENTION_TYPE_OFFER,        //买方报价
    
}
HO_ATTENTION_TYPE;


typedef enum
{
    HO_SEARCH_CLOSED,          //未搜索
    HO_SEARCH_OPENED,         //打开搜索panel 此状态包含HO_SEARCH_CLEAR
    HO_SEARCH_SEARCHING,     //搜索中
    HO_SEARCH_SEARCHED,     //搜索到的, 显示搜索结果
    HO_SEARCH_NORESULt,     //未搜索到内容
    
}
HO_SEARCH_STATUS;

typedef enum
{
	//1:院领导,2:报修人员,3:维修人员
	HO_USER_TYPE_LEADER = 1,		//1:院领导
	HO_USER_TYPE_REPORTER,	//报修人员
	HO_USER_TYPE_REPAIRER,//维修人员
	
}
HO_USER_TYPE;

typedef enum
{
	HO_PAY_STATUS_UNPAY,		//普通用户
	HO_PAY_STATUS_PAYED,	//翻译师
	
}
HO_PAY_STATUS;

typedef enum
{
	HO_TRANS_LEVEL_UNAUDIT,//未审核
	HO_TRANS_LEVEL_PRIMARY,//初级翻译师
	HO_TRANS_LEVEL_INTERMEDIATE,//中级
	HO_TRANS_LEVEL_ADVANCE,//高级
	HO_TRANS_LEVEL_AUDITING,//审核中
	HO_TRANS_LEVEL_AUDITFAILED,//审核失败
}
HO_TRANS_LEVEL;

#pragma mark - -- notificaiton message type
typedef enum
{
	HO_NC_TYPE_REPORT = 10,				//发布报修信息提醒
	HO_NC_TYPE_ORDER_ASSIGNED = 11,			//报修单已分配人员处理
	HO_NC_TYPE_REPAIR_AGAIN = 12,		//重新修改故障类型提醒
	HO_NC_TYPE_ORDER_REASSIGNED = 13,		//重新分配维修人提醒
	HO_NC_TYPE_ORDER_REPAIR_COMPLETED = 14, //维修人确认维修完成提醒
	HO_NC_TYPE_ORDER_ORDER_COMFIRMED = 15, //报修人确认完成提醒
	
	HO_NC_TYPE_ORDER_PAY = 30,				//支付提醒
	HO_NC_TYPE_ORDER_ARRIVED_REMIND = 31,	//订单临近提醒
	HO_NC_TYPE_ORDER_CANCELED = 32,			//订单取消提醒 -
	HO_NC_TYPE_ORDER_RENEW = 13,			//续单提醒
	HO_NC_TYPE_PAY_REFUND = 33,				//退单提醒  -
	HO_NC_TYPE_PAY_EXTRACT = 14,			//提现提醒 -
	HO_NC_TYPE_GRADE_CHECKING = 50,			//等级审核状态提醒 -
	HO_NC_TYPE_NEWS_RECOMMEND = 51,			//资讯推荐提醒
	
}
HO_NC_TYPE;
typedef enum
{
	//【1:未处理2:已处理3:维修完成4:确认完成】
	HO_REPORT_ORDER_ALL = 0,   //
	HO_REPORT_ORDER_UNACCEPT = 1,   //1:未处理2
	HO_REPORT_ORDER_ACCEPTED,//2:已受理
	HO_REPORT_ORDER_REPAIRED,//3:维修完成
	HO_REPORT_ORDER_CONFIRMED,//4:确认完成
	HO_REPORT_ORDER_UNCOMPLETED,//5:未完成
	
	//for 外协单状态
	HO_EXTRA_ASS_ORDER_DELETED 		= 18,   //删除的外协单
	HO_EXTRA_ASS_ORDER_ALL 			= 19,   //所有外协单
	HO_EXTRA_ASS_ORDER_UNCHECK 		= 20,   //未审核
	HO_EXTRA_ASS_ORDER_DIR_CHECK 	= 21, 	//一级审核  主任审核
	HO_EXTRA_ASS_ORDER_DEAN_CHECK 	= 22, 	//二级审核  院长审核
	HO_EXTRA_ASS_ORDER_REPAIRED 	= 23,	//维修完成
	HO_EXTRA_ASS_ORDER_CONFIRMED 	= 24, 	//确认完成
	HO_EXTRA_ASS_ORDER_CHECK_FAILED = 25, 	//审核失败
	HO_EXTRA_ASS_ORDER_CHECK_UNCOMPLETE = 26, 	//未维修完成
}
HO_REPORT_ORDER_STATUS;

typedef enum
{
	//For Message Status Type.
	AUDIO_STOPED,
	AUDIO_PLAYING,
	AUDIO_ERROR
}
AUDIO_PLAY_STATUS;
typedef enum
{
	METER_TYPE_WATER,//0:水表
	METER_TYPE_PEAK_VALLEY_ELECTRIC,//1:峰谷电表
	METER_TYPE_GAS,//2:水表
	METER_TYPE_ELECTRIC,//3:电表
}
HO_METER_TYPE;
typedef enum
{
	STATISTICS_TYPE_DEPT_WORKLOAD = 1,		//1:维修部门工作量统计
	STATISTICS_TYPE_PERSONAL_WORKLOAD,	//2:个人工作量统计
	STATISTICS_TYPE_FAULT_AREA,				//3:故障区域统计
	STATISTICS_TYPE_FAULT_TYPE,				//4:故障类型统计
	STATISTICS_TYPE_FAULT_DEPARTMENT,		//5:故障类型统计
	STATISTICS_TYPE_RESUBMIT,				//6:返修率统计
	STATISTICS_TYPE_SATISFACTION,			//7:满意度统计
	STATISTICS_TYPE_REPAIR_EFFECT,			//8:维修效率统计
	STATISTICS_TYPE_PERSONAL,				//9:个人得分统计
}
HO_STATISTICS_TYPE;


//0:提议新需求 1:功能不足问题  2:App问题  3:其他问题

typedef enum
{
	QUESTION_TYPE_NEW_FEATURE,//0:提议新需求
	QUESTION_TYPE_BAD_FEATURE,//1:功能不足问题
	QUESTION_TYPE_APP_ISSUE,//2:App问题
	QUESTION_TYPE_OTHER,//3:其他问题
}
HO_QUESTION_TYPE;


//0:提议新需求 1:功能不足问题  2:App问题  3:其他问题

#pragma mark - Service From
typedef enum
{
	HO_SERVICE_WEIDU,//0:提议新需求
	HO_SERVICE_CAIYUN,//1:功能不足问题
}
HO_SERVICE_TYPE;
#pragma mark
#pragma mark - aera level type
typedef enum
{
	HO_AERA_LEVEL1 = 1,//1:只有一级
	HO_AERA_LEVEL2,//2:只有两级
	HO_AERA_LEVEL3,//3:只有三级
}
HO_AERA_LEVEL_TYPE;
#pragma mark
#pragma mark - aera select type
typedef enum
{
	HO_AREA_SEL_MULTI,//0:可以单选一个，也可以多选几个
	HO_AREA_SEL_FULL,//需要每一级都选择上
}
HO_AREA_SEL_TYPE;
#pragma mark


typedef enum
{
	HO_TAG_FAULT_DESC,
	HO_TAG_EFFECT_SCOPE,
	HO_TAG_BUDGE,
	HO_TAG_EXTRA_MOBILE,
	HO_TAG_EXTRA_NAME
}
HO_INFO_FILLIN_TAG;
#endif
